home *** CD-ROM | disk | FTP | other *** search
- result2 = "nook";
- set("..:flp","0");
- tek_x = getProperty("../figure", _X);
- tek_y = getProperty("../figure", _Y);
- tek_xm = eval("..:max_x") * "10";
- tek_ym = eval("..:max_y") * "10";
- fl1 = "0";
- fl2 = "0";
- fl3 = "0";
- n = "1";
- while("4" >= n)
- {
- if(n == "1")
- {
- tposx = (getProperty("../figure", _X) + getProperty("../figure/k1", _X) - "5") / "10" + "1";
- tposy = (getProperty("../figure", _Y) + getProperty("../figure/k1", _Y) - "5") / "10" + "1";
- }
- if(n == "2")
- {
- tposx = (getProperty("../figure", _X) + getProperty("../figure/k2", _X) - "5") / "10" + "1";
- tposy = (getProperty("../figure", _Y) + getProperty("../figure/k2", _Y) - "5") / "10" + "1";
- }
- if(n == "3")
- {
- tposx = (getProperty("../figure", _X) + getProperty("../figure/k3", _X) - "5") / "10" + "1";
- tposy = (getProperty("../figure", _Y) + getProperty("../figure/k3", _Y) - "5") / "10" + "1";
- }
- if(n == "4")
- {
- tposx = (getProperty("../figure", _X) + getProperty("../figure/k4", _X) - "5") / "10" + "1";
- tposy = (getProperty("../figure", _Y) + getProperty("../figure/k4", _Y) - "5") / "10" + "1";
- }
- if(int(tposy) - tposy == "0")
- {
- if(eval("..:dim" add tposx add "_" add tposy) eq "")
- {
- fl1 += "1";
- }
- if(tposy + "1" < eval("..:max_y") + "2")
- {
- fl2 += "1";
- }
- if("0" < tposx and tposx < eval("..:max_x") + "1")
- {
- fl3 += "1";
- }
- }
- else
- {
- m = int(tposy) - tposy;
- if("0" < m)
- {
- ty = tposy - m;
- }
- else
- {
- ty = tposy + m;
- }
- ty1 = ty + "1";
- if(eval("..:dim" add tposx add "_" add ty) eq "" and eval("..:dim" add tposx add "_" add ty1) eq "")
- {
- fl1 += "1";
- }
- if(ty1 < eval("..:max_y") + "1")
- {
- fl2 += "1";
- }
- if("0" < tposx and tposx < eval("..:max_x") + "1")
- {
- fl3 += "1";
- }
- }
- n += "1";
- }
- if(fl1 == "4" and fl2 == "4" and fl3 == "4")
- {
- result2 = "ok";
- }
- if(fl2 != "4")
- {
- set("..:flp","1");
- }
- stop();
-